<?php
// 适配器模式
// 通过适配器，将不同的类，统一调用方法
// adaptee 需要适配的类

class Adaptee
{
	public function request1()
	{

	}
}

interface Target
{
	public function request();
}

class Adapter implements Target
{
	protected $adaptee;

	public function __construct(Adaptee $adaptee)
	{
		$this->adaptee = $adaptee;
	}

	public function request()
	{
		return $this->adaptee->request1();
	}
}

$adaptee = new Adaptee;
$adapter = new Adapter($adaptee);
$adapter->request();